#!/usr/bin/env python

import sys
import re

for line in sys.stdin:
    memcpy_m = re.search(r'^AVG.*MEMCPY.*Copy: ([.\d]+) MiB/s', line)
    dump_m = re.search(r'^AVG.*DUMB.*Copy: ([.\d]+) MiB/s', line)
    mcblock_m = re.search('^AVG.*MCBLOCK.*Copy: ([.\d]+) MiB/s', line)
    if memcpy_m:
        print 'memcpy_avg: ' + str(memcpy_m.group(1))
    elif dump_m:
        print 'dump_avg: ' + str(dump_m.group(1))
    elif mcblock_m:
        print 'mcblock_avg: ' + str(mcblock_m.group(1))
